#include "SmartBox.h"
#include "PwmOut.h"
#include "SW1248.h"
#include "CmdLine.h"
#include "log.h"

SmartBox::SmartBox(I2CSlave& i2c_slave,DispatcherHandler& dispatcher,Mail<>& mb):
    _i2c_slave(i2c_slave),
    _dispatcher(dispatcher),
    _mb(mb)
{
   
}

SmartBox::~SmartBox()
{
    
}
void SmartBox::begin()
{
 
}

void SmartBox::schedule()
{
    if(!_i2c_slave.read(_reg_data_read)){
        return;
    }
   
   _dispatcher.dispatch(_reg_data_read.memory.data,_reg_data_read.memory.size);
}
void SmartBox::update()
{
    
}
void SmartBox::cleanup()
{

}


